// @ 符号在build/webpack.base.conf.js 中配置 表示 'src' 路径
import request from '@/utils/request'

export default {

  pageList(currentPage, size) {
    return request({
      //  baseURL: 'http://127.0.0.1:9110',
      url: `/service-cms/admin/modules/list/${currentPage}/${size}`,
      method: 'get'
    })
  },

  removeById(id) {
    return request({
      //  baseURL: 'http://127.0.0.1:9110',
      url: `/service-cms/admin/modules/delete/${id}`,
      method: 'delete'
    })
  },

  save(ad) {
    return request({
      //  baseURL: 'http://127.0.0.1:9110',
      url: '/service-cms/admin/modules/save',
      method: 'post',
      data: ad
    })
  },

  getById(id) {
    return request({
      //  baseURL: 'http://127.0.0.1:9110',
      url: `/service-cms/admin/modules/get/${id}`,
      method: 'get'
    })
  },

  updateById(ad) {
    return request({
      //  baseURL: 'http://127.0.0.1:9110',
      url: '/service-cms/admin/modules/update',
      method: 'put',
      data: ad
    })
  },
  // getWebCMSList(id){
  //   return request({
  //   //  baseURL: 'http://127.0.0.1:9110',
  //     url: '/admin/modules/update',
  //     method: 'put',
  //   })
  // }
}
